<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>  
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>hello spring boot</title>
</head>
<body>
    <form action="/test/demoAdd" method="post" th:object="${demo}">
   <p>姓名：<input type="text" name="name" th:value="*{name}" />

       </p>

       <p th:if="${demo.name}" th:errors="${demo.name}">${demo.name}</p>

       <p>密码：<input type="text" name="password" th:value="*{password}"  />

       </p>

       <p th:if="${demo.password}" th:errors="*{password}">${demo.password}</p>
       
		<%-- <c:forEach var="${checkerr}" begin="1" end="2">
		   Item <c:out value="${checkerr}.getDefaultMessage()"/><p>
		</c:forEach> --%>
		
       <p><button>提交</button></p>
    </form>
</body>
</html>